package messaage;

public class AddPostMsg extends Message {

	protected String forumID;
	protected String postID;
	protected String topicName;
	protected String body;

	public AddPostMsg(String _username, String _forumID, String _postID,
			String _topicName, String _body) {
		this.username = _username;
		this.forumID = _forumID;
		// this.threadID = _threadID;
		this.postID = _postID;
		this.body = _body;
		this.topicName = _topicName;
	}

	@Override
	public String toString() {
		String msg = "AddPostMsg\n " + "Username:" + this.username + "\n"
				+ "ForumID:" + this.forumID + "\nPostId:" + this.postID
				+ "\nTopic Name:" + this.topicName + "\nBody:" + this.body
				+ "\n" + '\0';

		return msg;
	}

	public int getForumID() {
		return Integer.parseInt(this.forumID);
	}

	/*
	 * public int getThreadID() { return Integer.parseInt(threadID); }
	 */
	public int getPostID() {
		return Integer.parseInt(postID);
	}

	public String getTopicName() {
		return topicName;
	}

	public String getBody() {
		return body;
	}

}
